﻿<UserControl x:Class="MyCpuMonitor.Controls.ControlCpuInfo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="Auto" Width="Auto" Background="Transparent">
    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ListBox Grid.Row="0" x:Name="ListBoxBasicInfo" HorizontalContentAlignment="Stretch" BorderThickness="1" BorderBrush="Black" Margin="5">
            <ListBox.Background>
                <RadialGradientBrush GradientOrigin="1,1">
                    <GradientStop Color="LightGoldenrodYellow" Offset="0" />
                    <GradientStop Color="White" Offset="1" />
                </RadialGradientBrush>
            </ListBox.Background>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <DockPanel>
                        <TextBlock DockPanel.Dock="Left" Text="{Binding Path=Name}" FontWeight="Bold"  HorizontalAlignment="Right" Margin="5,0"/>
                        <TextBlock Text="{Binding Path=Value}" />
                    </DockPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

        <Expander Margin="5" Grid.Row="1" MaxHeight="250">
            <Expander.Header>
                <Border Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Expander}}, Path=ActualWidth}" Height="24" Padding="0,0,27,0" Margin="0,0,0,5">
                    <Border CornerRadius="5" BorderBrush="Black"  BorderThickness="1" Padding="5,0,0,0">
                        <Border.Background>
                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" Opacity="0.8">
                                <GradientStop Color="LightSteelBlue" Offset="0.0" />
                                <GradientStop Color="White" Offset="1" />
                            </LinearGradientBrush>
                        </Border.Background>

                        <TextBlock Text="Full Details..." Foreground="Black" VerticalAlignment="Center" />
                    </Border>
                </Border>
            </Expander.Header>
            <ListBox x:Name="ListBoxMoreInfo">
                <ListBox.Background>
                    <RadialGradientBrush GradientOrigin="1,1">
                        <GradientStop Color="LightGoldenrodYellow" Offset="0" />
                        <GradientStop Color="White" Offset="1" />
                    </RadialGradientBrush>
                </ListBox.Background>
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <DockPanel>
                            <TextBlock DockPanel.Dock="Left" Text="{Binding Path=Name}" FontWeight="Bold"  HorizontalAlignment="Right" Margin="5,0"/>
                                <TextBlock Text="{Binding Path=Value}" />
                            </DockPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Expander>
    </Grid>
</UserControl>
